// @ts-ignore
import request from '@/utils/request';

// 获取分页数据
export function getListByPageAPI(params) {
    return request({
        url: '/center/approvalInfo/list',
        method: 'get',
        params,
    });
}

// 新增
export function addAPI(data) {
    return request({
        url: '/center/approvalInfo/add',
        method: 'post',
        data,
    });
}

// 根据id查询
export function getByIdAPI(id) {
    return request({
        url: '/center/approvalInfo/view',
        method: 'get',
        params: { id },
    });
}

// 根据id查询商家信息
export function getByIdUser(id) {
    return request({
        url: '/center/system/user/view',
        method: 'get',
        params: { id },
    });
}

// 编辑
export function updateAPI(data) {
    return request({
        url: '/center/approvalInfo/update',
        method: 'post',
        data,
    });
}

// 商家入驻审批
export function updateUserApproval(data) {
    return request({
        url: '/center/system/user/approve',
        method: 'post',
        data,
    });
}

// 提现申请审批
export function updateAmountApproval(data) {
    return request({
        url: '/center/amountInfo/approval',
        method: 'post',
        data,
    });
}

// 退款申请审批
export function wxRefund(data) {
    return request({
        url: '/center/v3/wxRefund',
        method: 'post',
        data,
    });
}

// 删除
export function delAPI(data) {
    return request({
        url: '/center/approvalInfo/delete',
        method: 'post',
        data,
    });
}
